﻿<%@ Page Title="" Language="C#" MasterPageFile="~/UsersMaster.master" AutoEventWireup="true"
    CodeBehind="SearchUser.aspx.cs" Inherits="SMS.Account.SearchUser" %>

<asp:Content ID="Content1" ContentPlaceHolderID="UserHeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="UserMainContent" runat="server">
    <div id="search" class="boxed">
        <h2 class="title" dir="rtl">
            <img src="../App_Themes/Theme/images/Search 2.png" class="img" />
            بحث</h2>
        <div dir="rtl" class="content">
            <table dir="rtl">
                <tr>
                    <td>
                        <asp:Label ID="Label2" runat="server" Text="الإسم:"></asp:Label>
                    </td>
                    <td align="right">
                        <asp:TextBox ID="txtName" runat="server" />
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Label ID="Label8" runat="server" Text="التصريح:"></asp:Label>
                    </td>
                    <td align="right">
                        <asp:DropDownList ID="drpRoles" AppendDataBoundItems="true" Width="100%" runat="server">
                            <asp:ListItem Text="الكل" Value="-1"></asp:ListItem>
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td colspan="2" align="left">
                        <asp:Button CssClass="checkoutbutton" Text="بحث" ID="txtSearch" runat="server" OnClick="txtSearch_Click" Style="height: 26px" />
                    </td>
                </tr>
            </table>
            <table width="100%">
                <tr>
                    <td align="right">
                        <asp:GridView ID="GridView1" CssClass="Grid" DataKeyNames="ID" PagerStyle-CssClass="Pager"
                            HeaderStyle-Wrap="true" PageIndex="0" 
                            PagerSettings-Mode="NumericFirstLast" AllowPaging="true"
                            PageSize="5" runat="server" AutoGenerateColumns="False" Width="90%" 
                            onrowdeleting="GridView1_RowDeleting" 
                            onselectedindexchanged="GridView1_SelectedIndexChanged" 
                            onpageindexchanging="GridView1_PageIndexChanging">
                            <PagerStyle HorizontalAlign="Center" />
                            <Columns>
                                <asp:BoundField DataField="Name" HeaderText="الإسم" />
                                <asp:TemplateField HeaderText="التصريح">
                                    <ItemTemplate>
                                        <%#DataBinder.Eval(Container.DataItem,"Role.Name") %>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:BoundField DataField="Address" HeaderText="العنوان" />
                                <asp:BoundField DataField="Mobile" HeaderText="الموبيل" />
                                <asp:CommandField ShowSelectButton="true" SelectText="تحديث" />
                                <asp:TemplateField HeaderText="مسح" HeaderStyle-Width="20px" ItemStyle-Width="20px">
                                    <ItemTemplate>
                                        <asp:ImageButton ID="ImageButton1" ImageUrl="../App_Themes/Theme/images/Error.png"
                                            Width="15px" Height="15px" CommandName="Delete" runat="server" />
                                    </ItemTemplate>
                                    <ItemStyle HorizontalAlign="Center" Width="20px" />
                                </asp:TemplateField>
                            </Columns>
                            <EmptyDataTemplate>
                                لا يوجد نتائج
                            </EmptyDataTemplate>
                            <EmptyDataRowStyle HorizontalAlign="Justify" Width="100%" />
                        </asp:GridView>
                    </td>
                </tr>
            </table>
        </div>
    </div>
</asp:Content>
